<?php
/*
 * 404
 * @package    admin
 * @author     Mark
 * @copyright  Copyright (c) 2013 ixdcw team
 * @version    $Id: 4861686e0a8a901f821fe10efdd35095c8cc6053 $
 */
require 'common.inc.php';
if(strpos($_SERVER['QUERY_STRING'], '404;') !== false) {
	$DT_URL = str_replace('404;', '', $_SERVER['QUERY_STRING']);
	$DT_URL = str_replace(':80', '', $DT_URL);
}
if($DT['log_404'] && strpos($DT_URL, '/404.php') === false) {
	require DT_ROOT.'/file/config/robot.inc.php';
	$url = addslashes($DT_URL);
	$time = $DT_TIME - 86400;
	$r = $db->getOne("SELECT itemid FROM {$db->getPre()}404 WHERE addtime>$time AND url='$url'");
	if(!$r) $db->query("INSERT INTO {$db->getPre()}404 (url,robot,username,ip,addtime) VALUES ('$url','".get_robot()."','$_username','$DT_IP','$DT_TIME')");
}
$head_title = '404 Not Found';
@header("HTTP/1.1 404 Not Found");
include template('404', 'message');